求个".vbs"的脚本

来源:百度知道 编辑:UC知道 时间:2024/05/22 18:56:04
大家帮帮忙.模拟按键 每过30秒按一次F3 60秒按2次F4 10分钟按2次F5
要求就这些,要代码,复制到TXT改名字就能用的.
Geniux1990 的回答不太好用,兄弟再完善下,每到60秒按F4没效果
可能是F3 和F4同时按了, 30秒按F3 63秒按F4 F5在10分钟左右,尽量不要同时按不同的键 让按2下中间延迟1秒吗

carson_guo 给的脚本运行无任何动作

set WshShell = WScript.CreateObject("WScript.Shell")
do
WScript.Sleep 30 * 1000
WshShell.SendKeys "{F3}"
WScript.Sleep 30 * 1000
WshShell.SendKeys "{F4}"
WScript.Sleep 1 * 1000
WshShell.SendKeys "{F4}"
WScript.Sleep 9 * 60 *1000
WshShell.SendKeys "{F5}"
WScript.Sleep 1 * 1000
WshShell.SendKeys "{F5}"
Loop

xp下我刚刚调试过, 没有问题的!!你清理环境在运行,有必要的话,重新启动,上来后就运行.肯定没有问题.

set shell=createobject("wscript.shell")
i=1
do
shell.sendkeys "{F4}"
if i/2=(i\2) then shell.sendkeys "{F4}{F4}"
wscript.sleep 1000
if i/20=(i\20) then shell.sendkeys "{F5}{F5}"
wscript.sleep 1000
wscript.sleep 28*1000
loop

set WshShell = WScript.CreateObject("WScript.Shell")